ACTOR "Protector Drone" 31094
{
    //$Category DN3D Aliens //Protector Drones
    Health 600
    Radius 20
    Height 56
    Mass 6500
    Speed 14
	HitObituary "%o was ripped apart by an alien protector drone."
    Obituary "%o was ripped apart by an alien protector drone."
    SeeSound "ProtectorDrone/Sight"
    AttackSound "ProtectorDrone/Melee"
    PainSound "ProtectorDrone/Pain"
    DeathSound "ProtectorDrone/Death"
    ActiveSound "ProtectorDrone/Active"
    DropItem "Shrinker Ammo" 64 5
	MeleeDamage 4
	PainChance 64
    BloodColor "AA D1 5C" 
    Scale 0.7
	DamageFactor "Damage_Foot", 0.37
	DamageFactor "Damage_Pistol", 1.16
    DamageFactor "Damage_DualPistol", 1.16
	DamageFactor "Damage_BlackTail", 1.2
    DamageFactor "Damage_DualBlackTail", 1.2
	DamageFactor "Damage_DesertEagle", 1.33
    DamageFactor "Damage_Shotgun", 1.15
	DamageFactor "Damage_SuperShotgun", 1.16
	DamageFactor "Damage_ExplosiveShotgun", 1.12
    DamageFactor "Damage_ChaingunCannon", 1.23
	DamageFactor "Damage_Minigun", 1.24
	DamageFactor "Damage_LMGBullet", 1.36
    DamageFactor "Damage_Explosion", 2.2
	DamageFactor "Damage_Shock", 1.9
	DamageFactor "Damage_BigShock", 2.0
	DamageFactor "Damage_Thunder", 0.0
	DamageFactor "Damage_BigThunder", 0.0
	DamageFactor "LaserExplosion", 0.0
    DamageFactor "Damage_Shrinker", 0.0
	DamageFactor "Damage_Expander", 1.07
	DamageFactor "Damage_Laser", 1.53
	DamageFactor "Damage_Railgun", 2.05
    DamageFactor "Ice", 1.23
    DamageFactor "Fire", 0.57
	DamageFactor "Damage_Pulse", 1.58
	DamageFactor "Trip_Punch", 0.0
    DamageFactor "AlienPoison", 0.0
	DamageFactor "Damage_Step", 0.0
	Painchance "Radial", 256
	Painchance "Damage_Foot", 256
	Painchance "Damage_DesertEagle", 128
	Painchance "Damage_ExplosiveShotgun", 192
	Painchance "Damage_ChaingunCannon", 192
	Painchance "Damage_Minigun", 192
	Painchance "Damage_LMGBullet", 192
    Painchance "Damage_Explosion", 192
	Painchance "Damage_Laser", 192
	Painchance "LaserShot", 256
	Painchance "Fire", 256
	MeleeThresHold 196
    MaxTargetRange 1024
    MeleeRange 56
    Species "Alien"
	Monster
	+NOTARGET
	+FLOORCLIP
    States
    {
	Spawn:
        APRD B 0
        APRD B 0 Thing_ChangeTID(0,1000)
        APRD B 2 A_Look
        Loop
    See:
	    APRD B 0
        APRD B 0 A_StopSoundEx("SoundSlot6")
		APRD B 0 A_ChangeFlag("NOPAIN",0)
		APRD B 0 A_Gravity
        APRD BBCC 2 A_Chase
		APRD C 0 A_SpawnItem("AlienStep5",0,0,0,0)
		APRD DDEE 2 A_Chase
		APRD E 0 A_SpawnItem("AlienStep5",0,0,0,0)
		APRD A 0 A_Jump(64,"Jump")
        Loop
	Jump: 
        APRD A 0 A_PlaySound("ProtectorDrone/Active",6)
		APRD A 0 A_ChangeFlag(SLIDESONWALLS,1)
        APRD A 5 A_FaceTarget
        APRD U 1 ThrustThingZ(0,70,0,1)
		APRD U 1 A_Recoil(-5)
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_Recoil(-5)
        APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_Recoil(-5)
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_Recoil(-5)
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_Recoil(-5)
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_Recoil(1)
	    APRD W 1 A_CheckFloor("ProtectorLand")
		Goto Jump+77
	ProtectorLand:
        APRD A 6 A_ScaleVelocity(0.6)
		APRD A 0 A_ChangeFlag(SLIDESONWALLS,0)
	    APRD A 0 A_ScaleVelocity(0)
        Goto See
	Missile:
        APRD I 0 A_JumpIfInTargetInventory("DukeShrinkCounter",1,"Lunge")
        APRD I 0 A_PlayWeaponSound("ProtectorDrone/Attack")
        APRD IIII 5 A_FaceTarget 
        APRD I 0 A_FaceTarget
        APRD J 1 Bright A_CustomMissile("AlienMorpherAttack",32,0,0)
		APRD J 9 Bright 
        APRD A 35
        Goto See
	Lunge: 
        APRD A 0 A_PlaySound("ProtectorDrone/Active")
        APRD A 20 A_FaceTarget
        APRD BCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDE 3 A_SkullAttack
        Goto Melee
    Melee:
        APRD F 7 A_FaceTarget
		APRD G 7 A_CustomMeleeAttack(Random(7,8),"","","Normal",1)
        APRD H 7 A_CustomMeleeAttack(Random(7,8),"ProtectorDrone/Melee","ProtectorDrone/Melee","Normal",1)
        Goto See
	Melee2:
        APRD F 0 A_FaceTarget
		APRD F 0 A_ChangeFlag(SLIDESONWALLS,0)
		APRD G 7 A_CustomMeleeAttack(Random(7,8),"ProtectorDrone/Melee","ProtectorDrone/Melee","Normal",1)
        APRD H 7 A_CustomMeleeAttack(Random(7,8),"ProtectorDrone/Melee","ProtectorDrone/Melee","Normal",1)
        Goto See
	Pain:
        APRD X 3
        APRD X 3 A_Pain
        Goto See
    Pain.Radial:
        APRD X 0
        APRD X 0 HealThing(2)
        Goto See	
	Pain.LaserShot:
	    APRD X 0
		APRD X 0 A_SpawnItemEx("PainTripLaser",0,0,5)
		APRD X 0 HealThing(2)
		Goto See
	Pain.Fire:
	    APRF A 0
		APRF A 0 A_GiveInventory("FireCheck",1)
		APRF A 0 A_GiveInventory("FireCheckDeath",1)
		APRF A 0 A_PlaySoundEx("FireLoop/Monsters","SoundSlot7",1)
		APRF A 0 A_PlaySound("ProtectorDrone/Pain",10)
		APRF A 0 A_ChangeFlag("NOPAIN",1)
		APRF A 0 A_ChangeFlag("FRIGHTENED",1)
		APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_JumpIfInventory("FireCheck",8,"PainFireStop")
		Loop	
	PainFireStop:
	    APRF A 0 
		APRF A 0 A_ChangeFlag("NOPAIN",0)
		APRF A 0 A_ChangeFlag("FRIGHTENED",0)
		APRF A 0 A_TakeInventory("FireCheck",999)
		APRF A 0 A_TakeInventory("FireCheckDeath",999)
		APRF A 0 A_StopSoundEx("SoundSlot7")
		Goto See
	Death:	
	    APRD L 0
		APRD L 0 A_JumpIfInventory("FireCheckDeath",1,"Burn")
		APRD L 0 A_ChangeFlag("NOPAIN",0)
		APRD L 0 A_StopSoundEx("SoundSlot7")
		APRD L 0 A_Jump(256,1,10)
		APRD L 5 A_Scream
        APRD M 5
        APRD N 5 A_NoBlocking
        APRD OPQRS 5
        APRD T -1
        Stop
		APR2 L 5 A_Scream
        APR2 M 5
        APR2 N 5 A_NoBlocking
        APR2 OPQRS 5
        APR2 T 1 A_GiveInventory("Death2Check",1)
		APR2 T -1 
        Stop
    Death.Damage_Explosion:
	Death.Damage_BigShock:
		APRD B 0
		APRD B 0 A_ChangeFlag("NOPAIN",0)
		APRD B 0 A_StopSoundEx("Body")
		APRD B 0 A_StopSoundEx("SoundSlot7")
        APRD B 0 A_PlaySound("Gib/Explode",5)
        APRD B 0 A_NoBlocking
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs1")
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs2")
		APRD BBB 0 A_SpawnDebris("DukeGreenGibs3")
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs4")
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs5")		
        APRD BBBBBBBBB 0 A_SpawnDebris("DukeGreenGibs6")
	    TNT1 A 1
	    Stop
    Death.Damage_Expander:
        APRD B 0
		APRD B 0 A_StopSoundEx("Body")
		APRD B 0 A_StopSoundEx("SoundSlot7")
		APRD B 1 A_PlaySound("Expander/Expand",5)
		APRD B 1 A_SetScale(0.71,0.71)
        APRD B 1 A_SetScale(0.72,0.72)
		APRD B 1 A_SetScale(0.73,0.73)
		APRD B 1 A_SetScale(0.74,0.74)
		APRD B 1 A_SetScale(0.75,0.75)
		APRD B 1 A_SetScale(0.76,0.76)
		APRD B 1 A_SetScale(0.77,0.77)
		APRD B 1 A_SetScale(0.78,0.78)
		APRD B 1 A_SetScale(0.79,0.79)
		APRD B 1 A_SetScale(0.80,0.80)
		APRD B 1 A_SetScale(0.81,0.81)
		APRD B 1 A_SetScale(0.82,0.82)
		APRD B 1 A_SetScale(0.83,0.83)
		APRD B 1 A_SetScale(0.84,0.84)
		APRD B 1 A_SetScale(0.85,0.85)
		APRD B 1 A_SetScale(0.86,0.86)
		APRD B 1 A_SetScale(0.87,0.87)
		APRD B 1 A_SetScale(0.88,0.88)
		APRD B 1 A_SetScale(0.89,0.89)
		APRD B 1 A_SetScale(0.90,0.90)
		APRD B 1 A_SetScale(0.91,0.91)
		APRD B 1 A_SetScale(0.92,0.92)
		APRD B 1 A_SetScale(0.93,0.93)
		APRD B 1 A_SetScale(0.94,0.94)
		APRD B 1 A_SetScale(0.95,0.95)
		APRD B 1 A_SetScale(0.96,0.96)
		APRD B 1 A_SetScale(0.97,0.97)
		APRD B 1 A_SetScale(0.98,0.98)
		APRD B 1 A_SetScale(0.99,0.99)
		APRD B 1 A_SetScale(1.00,1.00)
		APRD B 1 A_SetScale(1.01,1.01)
		APRD B 1 A_SetScale(1.02,1.02)
		APRD B 1 A_SetScale(1.03,1.03)
		APRD B 1 A_SetScale(1.04,1.04)
		APRD B 1 A_SetScale(1.05,1.05)
		APRD B 1 A_SetScale(1.06,1.06)
		APRD B 1 A_SetScale(1.07,1.07)
		APRD B 1 A_SetScale(1.08,1.08)
		APRD B 1 A_SetScale(1.09,1.09)
		APRD B 1 A_SetScale(1.10,1.10)
		APRD B 1 A_SetScale(1.11,1.11)
		APRD B 1 A_SetScale(1.12,1.12)
		APRD B 1 A_SetScale(1.13,1.13)
		APRD B 1 A_SetScale(1.14,1.14)
        APRD B 25 A_SetScale(1.15,1.15)
        APRD B 0 A_SpawnItemEx("ExpanderExplosion",0,0,32,0,0,0,0,SXF_ABSOLUTEVELOCITY,0)
        Goto Death.Damage_Explosion
	Burn:
	    APRF L 0
		APRF L 0 A_ChangeFlag("NOPAIN",0)
		APRF L 0 A_StopSoundEx("SoundSlot7")
		APRF L 0 A_Jump(256,1,40)
		APRF L 0 A_Scream
        APRF LLLLLMMMMM 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,56),0,0,1,0,32)
        APRF N 0 A_NoBlocking
        APRF OOOOO 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,50),0,0,1,0,32)
		APRF PPPPP 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,44),0,0,1,0,32)
		APRF QQQQQ 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,36),0,0,1,0,32)
		APRF RRRRR 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,23),0,0,1,0,32)
		APRF SSSSS 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,15),0,0,1,0,32)
		APRF T 1 A_SpawnItemEx("FireintheFloor")
        APRF T -1
        Stop
		APF2 L 0 A_Scream
        APF2 LLLLLMMMMM 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,56),0,0,1,0,32)
        APF2 N 0 A_NoBlocking
        APF2 OOOOO 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,50),0,0,1,0,32)
		APF2 PPPPP 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,44),0,0,1,0,32)
		APF2 QQQQQ 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,36),0,0,1,0,32)
		APF2 RRRRR 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,23),0,0,1,0,32)
		APF2 SSSSS 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,15),0,0,1,0,32)
		APF2 T 1 A_SpawnItemEx("FireintheFloor")
        APF2 T 1 A_GiveInventory("Death2CheckFire",1) 
		APF2 T -1 
        Stop
	Raise:
	    TNT1 A 0 
	    TNT1 A 0 A_UnSetShootable
		TNT1 A 0 A_ChangeFlag("COUNTKILL",0)
		TNT1 A 0 A_ChangeFlag("SOLID",0)
	    APRD T 0 A_JumpIfInventory("FireCheckDeath",1,"Raise2")
		APRD T 0 A_JumpIfInventory("Death2Check",1,2)
		APRD T 35
		Stop
		APR2 T 0
		APR2 T 35
		Stop
	Raise2:
		APRF T 0
		APRF T 0 A_JumpIfInventory("Death2CheckFire",1,2)
		APRF T 35
		Stop
		APF2 T 0
		APF2 T 35
		Stop
	    }
}

ACTOR " Protector Drone " : "Protector Drone" 31095
{
    //$Category DN3D Aliens //Protector Drones
	DropItem "Shrinker Ammo" 64 5
    States
    {
	Spawn:
		APRD K 0
		APRD K 1 A_JumpIfInventory("QueenDroneCheck",1,6)
		APRD K 1 A_GiveInventory("QueenDroneCheck",1)
        APRD K 0 Thing_ChangeTID(0,1000)
		APRD K 48 		
		APRD KK 4 A_Look
		Goto See	
		APRD B 2 A_Look
        Loop
    See:
	    APRD K 0
        APRD K 0 A_StopSoundEx("SoundSlot6")
		APRD K 0 A_ChangeFlag("NOPAIN",0)
		APRD K 0 A_Gravity
        APRD BBCC 2 A_Chase
		APRD C 0 A_SpawnItem("AlienStep5",0,0,0,0)
		APRD DDEE 2 A_Chase
		APRD E 0 A_SpawnItem("AlienStep5",0,0,0,0)
		APRD A 0 A_Jump(64,"Jump")
        Loop
	Jump: 
        APRD A 0 A_PlaySound("ProtectorDrone/Active",6)
        APRD A 5 A_FaceTarget
        APRD U 1 ThrustThingZ(0,70,0,1)
		APRD U 1 A_Recoil(-5)
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_Recoil(-5)
        APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_JumpIfCloser(71,"Melee2")
		APRD U 1 A_CheckFloor("ProtectorLand")
		APRD U 0 A_Recoil(-5)
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_Recoil(-5)
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD V 0 A_JumpIfCloser(71,"Melee2")
		APRD V 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_Recoil(-5)
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
		APRD W 1 A_CheckFloor("ProtectorLand")
		APRD W 0 A_JumpIfCloser(71,"Melee2")
	    APRD W 1 A_CheckFloor("ProtectorLand")
		Goto Jump+76
	ProtectorLand:
        APRD A 6 A_ScaleVelocity(0.6)
	    APRD A 0 A_ScaleVelocity(0)
        Goto See
	Missile:
        APRD I 0 A_JumpIfInTargetInventory("DukeShrinkCounter",1,"Lunge")
        APRD I 0 A_PlayWeaponSound("ProtectorDrone/Attack")
        APRD IIII 5 A_FaceTarget 
        APRD I 0 A_FaceTarget
        APRD J 1 Bright A_CustomMissile("AlienMorpherAttack",32,0,0)
		APRD J 9 Bright 
        APRD A 35
        Goto See
	Lunge: 
        APRD A 0 A_PlaySound("ProtectorDrone/Active")
        APRD A 20 A_FaceTarget
        APRD BCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDEBCDE 3 A_SkullAttack
        Goto Melee
    Melee:
        APRD F 7 A_FaceTarget
		APRD G 7 A_CustomMeleeAttack(Random(7,8),"","","Normal",1)
        APRD H 7 A_CustomMeleeAttack(Random(7,8),"ProtectorDrone/Melee","ProtectorDrone/Melee","Normal",1)
        Goto See
	Melee2:
        APRD F 0 A_FaceTarget
		APRD F 0 A_ChangeFlag(SLIDESONWALLS,0)
		APRD G 7 A_CustomMeleeAttack(Random(7,8),"ProtectorDrone/Melee","ProtectorDrone/Melee","Normal",1)
        APRD H 7 A_CustomMeleeAttack(Random(7,8),"ProtectorDrone/Melee","ProtectorDrone/Melee","Normal",1)
        Goto See
	Pain:
        APRD X 3
        APRD X 3 A_Pain
        Goto See
    Pain.Radial:
        APRD X 0
        APRD X 0 HealThing(2)
        Goto See	
	Pain.LaserShot:
	    APRD X 0
		APRD X 0 A_SpawnItemEx("PainTripLaser",0,0,5)
		APRD X 0 HealThing(2)
		Goto See
	Pain.Fire:
	    APRF A 0
		APRF A 0 A_GiveInventory("FireCheck",1)
		APRF A 0 A_GiveInventory("FireCheckDeath",1)
		APRF A 0 A_PlaySoundEx("FireLoop/Monsters","SoundSlot7",1)
		APRF A 0 A_PlaySound("ProtectorDrone/Pain",10)
		APRF A 0 A_ChangeFlag("NOPAIN",1)
		APRF A 0 A_ChangeFlag("FRIGHTENED",1)
		APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF B 0 A_Wander
		APRF B 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF BB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF C 0 A_Wander
		APRF C 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF CC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF D 0 A_Wander
		APRF D 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF DD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_Wander
		APRF E 0 A_SpawnItemEx("FireRadiusDamage4",0,0,38)
		APRF EE 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		APRF E 0 A_JumpIfInventory("FireCheck",8,"PainFireStop")
		Loop	
	PainFireStop:
	    APRF A 0 
		APRF A 0 A_ChangeFlag("NOPAIN",0)
		APRF A 0 A_ChangeFlag("FRIGHTENED",0)
		APRF A 0 A_TakeInventory("FireCheck",999)
		APRF A 0 A_TakeInventory("FireCheckDeath",999)
		APRF A 0 A_StopSoundEx("SoundSlot7")
		Goto See
	Death:	
	    APRD L 0
		APRD L 0 A_JumpIfInventory("FireCheckDeath",1,"Burn")
		APRD L 0 A_ChangeFlag("NOPAIN",0)
		APRD L 0 A_StopSoundEx("SoundSlot7")
		APRD L 0 A_Jump(256,1,10)
		APRD L 5 A_Scream
        APRD M 5
        APRD N 5 A_NoBlocking
        APRD OPQRS 5
        APRD T -1
        Stop
		APR2 L 5 A_Scream
        APR2 M 5
        APR2 N 5 A_NoBlocking
        APR2 OPQRS 5
        APR2 T 1 A_GiveInventory("Death2Check",1)
		APR2 T -1 
        Stop
    Death.Damage_Explosion:
	Death.Damage_BigShock:
		APRD B 0
		APRD B 0 A_ChangeFlag("NOPAIN",0)
		APRD B 0 A_StopSoundEx("Body")
		APRD B 0 A_StopSoundEx("SoundSlot7")
        APRD B 0 A_PlaySound("Gib/Explode",5)
        APRD B 0 A_NoBlocking
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs1")
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs2")
		APRD BBB 0 A_SpawnDebris("DukeGreenGibs3")
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs4")
        APRD BBB 0 A_SpawnDebris("DukeGreenGibs5")		
        APRD BBBBBBBBB 0 A_SpawnDebris("DukeGreenGibs6")
	    TNT1 A 1
	    Stop
    Death.Damage_Expander:
        APRD B 0
		APRD B 0 A_StopSoundEx("Body")
		APRD B 0 A_StopSoundEx("SoundSlot7")
		APRD B 1 A_PlaySound("Expander/Expand",5)
		APRD B 1 A_SetScale(0.71,0.71)
        APRD B 1 A_SetScale(0.72,0.72)
		APRD B 1 A_SetScale(0.73,0.73)
		APRD B 1 A_SetScale(0.74,0.74)
		APRD B 1 A_SetScale(0.75,0.75)
		APRD B 1 A_SetScale(0.76,0.76)
		APRD B 1 A_SetScale(0.77,0.77)
		APRD B 1 A_SetScale(0.78,0.78)
		APRD B 1 A_SetScale(0.79,0.79)
		APRD B 1 A_SetScale(0.80,0.80)
		APRD B 1 A_SetScale(0.81,0.81)
		APRD B 1 A_SetScale(0.82,0.82)
		APRD B 1 A_SetScale(0.83,0.83)
		APRD B 1 A_SetScale(0.84,0.84)
		APRD B 1 A_SetScale(0.85,0.85)
		APRD B 1 A_SetScale(0.86,0.86)
		APRD B 1 A_SetScale(0.87,0.87)
		APRD B 1 A_SetScale(0.88,0.88)
		APRD B 1 A_SetScale(0.89,0.89)
		APRD B 1 A_SetScale(0.90,0.90)
		APRD B 1 A_SetScale(0.91,0.91)
		APRD B 1 A_SetScale(0.92,0.92)
		APRD B 1 A_SetScale(0.93,0.93)
		APRD B 1 A_SetScale(0.94,0.94)
		APRD B 1 A_SetScale(0.95,0.95)
		APRD B 1 A_SetScale(0.96,0.96)
		APRD B 1 A_SetScale(0.97,0.97)
		APRD B 1 A_SetScale(0.98,0.98)
		APRD B 1 A_SetScale(0.99,0.99)
		APRD B 1 A_SetScale(1.00,1.00)
		APRD B 1 A_SetScale(1.01,1.01)
		APRD B 1 A_SetScale(1.02,1.02)
		APRD B 1 A_SetScale(1.03,1.03)
		APRD B 1 A_SetScale(1.04,1.04)
		APRD B 1 A_SetScale(1.05,1.05)
		APRD B 1 A_SetScale(1.06,1.06)
		APRD B 1 A_SetScale(1.07,1.07)
		APRD B 1 A_SetScale(1.08,1.08)
		APRD B 1 A_SetScale(1.09,1.09)
		APRD B 1 A_SetScale(1.10,1.10)
		APRD B 1 A_SetScale(1.11,1.11)
		APRD B 1 A_SetScale(1.12,1.12)
		APRD B 1 A_SetScale(1.13,1.13)
		APRD B 1 A_SetScale(1.14,1.14)
        APRD B 25 A_SetScale(1.15,1.15)
        APRD B 0 A_SpawnItemEx("ExpanderExplosion",0,0,32,0,0,0,0,SXF_ABSOLUTEVELOCITY,0)
        Goto Death.Damage_Explosion
	Burn:
	    APRF L 0
		APRF L 0 A_ChangeFlag("NOPAIN",0)
		APRF L 0 A_StopSoundEx("SoundSlot7")
		APRF L 0 A_Jump(256,1,40)
		APRF L 0 A_Scream
        APRF LLLLLMMMMM 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,56),0,0,1,0,32)
        APRF N 0 A_NoBlocking
        APRF OOOOO 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,50),0,0,1,0,32)
		APRF PPPPP 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,44),0,0,1,0,32)
		APRF QQQQQ 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,36),0,0,1,0,32)
		APRF RRRRR 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,23),0,0,1,0,32)
		APRF SSSSS 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,15),0,0,1,0,32)
		APRF T 1 A_SpawnItemEx("FireintheFloor")
        APRF T -1
        Stop
		APF2 L 0 A_Scream
        APF2 LLLLLMMMMM 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,56),0,0,1,0,32)
        APF2 N 0 A_NoBlocking
        APF2 OOOOO 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,50),0,0,1,0,32)
		APF2 PPPPP 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,44),0,0,1,0,32)
		APF2 QQQQQ 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,36),0,0,1,0,32)
		APF2 RRRRR 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,23),0,0,1,0,32)
		APF2 SSSSS 1 A_SpawnItemEx("FirePuffDuke",Random(-20,20),Random(-20,20),Random(5,15),0,0,1,0,32)
		APF2 T 1 A_SpawnItemEx("FireintheFloor")
        APF2 T 1 A_GiveInventory("Death2CheckFire",1) 
		APF2 T -1 
        Stop
	Raise:
	    TNT1 A 0 
	    TNT1 A 0 A_UnSetShootable
		TNT1 A 0 A_ChangeFlag("COUNTKILL",0)
		TNT1 A 0 A_ChangeFlag("SOLID",0)
	    APRD T 0 A_JumpIfInventory("FireCheckDeath",1,"Raise2")
		APRD T 0 A_JumpIfInventory("Death2Check",1,2)
		APRD T 35
		Stop
		APR2 T 0
		APR2 T 35
		Stop
	Raise2:
		APRF T 0
		APRF T 0 A_JumpIfInventory("Death2CheckFire",1,2)
		APRF T 35
		Stop
		APF2 T 0
		APF2 T 35
		Stop
	    }
}

ACTOR AlienStep5
{
    +NOINTERACTION
    +CLIENTSIDEONLY
    States
    {
    Spawn:
	    TNT1 A 0
	    TNT1 A 0 A_PlaySound("Foot/AlienStep5")
	    Stop
	    }
}